import {
  HYEventStore
} from "hy-event-store"
import {
  getRecomendList
} from "../services/music"
// 使用 store
const recomendStore = new HYEventStore({
  state: {
    recomendSongInfo: {}, //推荐两歌曲的所有数据
  },
  actions: {
    // 网络请求 推荐歌曲的列表数据
    fetchRecomendSongsAction(ctx) {
      getRecomendList(3778678).then(res => {
        //  console.log(res.playlist);
        ctx.recomendSongInfo = res.playlist
      })

    }
  }
})
export default recomendStore